﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Text;
using System.Xml;

using Webchatting.Dal;
using Webchatting.Common;

public partial class Register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSummit_Click(object sender, EventArgs e)
    {
        int Sextag = 1;
        Random rd = new Random();
        string RUId = rd.Next(1000000).ToString();
        OperationRU OperateRUser = new OperationRU();
        if (rdbSexMan.Checked)
            Sextag = 1;
        else if (rdbSexWoman.Checked)
            Sextag = 0; 
        
        OperateRUser.AddRUser(RUId,txtPwd.Text,txtUserNickName.Text.Trim(),txtUserRealName.Text.Trim(),Sextag.ToString(),txtcollege.Text.Trim(),txtEmail.Text.Trim(),txtcity.Text.Trim(),txtAge.Text,txtcity.Text.Trim(),txtUserTel.Text);
        OperateRUser.InsertSafeInfo(RUId, txtPwd.Text);
        Session["RUId"] = RUId;
        Server.Transfer("Index.aspx");

    }
    protected void BtnCancel_Click(object sender, EventArgs e)
    {
        Server.Transfer("Index.aspx");

    }
}
